home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Gui4Cli / Docs / Tutorials / ChangeArg.gc < prev    next >
Encoding:
Gui4CLI script  |  1980-01-03  |  1.7 KB  |  72 lines

  1. G4C
  2.  
  3. ; -----  Uses the ChangeArg command to reset the left, top, 
  4. ;        width, height or title of a specimen button.
  5.  
  6. WinBig -1 -1 300 150 "ChangeArg.gc"
  7. WinType 11110001
  8. usetopaz
  9.  
  10. BOX 0 0 0 0 OUT RIDGE
  11.  
  12. ; ---- Emphasise the RESET option
  13. BOX 148 109 84 14 OUT BUTTON
  14.  
  15. xonLoad
  16. GuiOpen ChangeArg.gc
  17.  
  18. xonClose
  19. GuiQuit ChangeArg.gc
  20.  
  21. Text 30 6 100 12 'Changing args' 15 NOBOX
  22.  
  23. ; ---- The button has five arguments, but you need to
  24. ;      consider them as numbers 0, 1, 2, 3, and 4.
  25. xButton 90 30 120 12 'The Specimen'
  26. gadid 1
  27.  
  28. Text 20 60 100 12 'Change...' 10 NOBOX
  29.  
  30. ; ----- Here are the buttons which trigger the changes.
  31.  
  32. xButton 50 80 80 12 'Left'
  33.  
  34. ; ---- In gadid 1, change arg 0 ('Left') to 40
  35. ;      The gui must be redrawn for the change to be visible.
  36. ChangeArg ChangeArg.gc 1 0 40
  37. Redraw ChangeArg.gc
  38.  
  39.  
  40. xButton 150 80 80 12 'Top'
  41.  
  42. ; ---- Change argument number 1 ('top') to 40, and redraw.
  43. ChangeArg ChangeArg.gc 1 1 40
  44. Redraw ChangeArg.gc
  45.  
  46.  
  47. xButton 50 95 80 12 'Width'
  48.  
  49. ; ---- Change argument number 2 ('width') to 180, and redraw.
  50. ChangeArg ChangeArg.gc 1 2 180
  51. Redraw ChangeArg.gc
  52.  
  53.  
  54. xButton 150 95 80 12 'Height'
  55.  
  56. ; ---- Change argument number 3 ('height') to 16, and redraw.
  57. ChangeArg ChangeArg.gc 1 3 16
  58. Redraw ChangeArg.gc
  59.  
  60. xButton 50 110 80 12 'Title'
  61. ; ---- Change argument number 4 ('title'), and redraw.
  62. ;      Length of new title is padded to length of old.
  63. ;      If new title is to be made longer than the original,
  64. ;      then the original should be padded with spaces to
  65. ;      allow for the extra length.
  66. ChangeArg ChangeArg.gc 1  4 'New title   '
  67. Redraw ChangeArg.gc
  68.  
  69. xButton 150 110 80 12 'RESET'
  70. ChangeGad ChangeArg.gc 1 90 30 120 12 'The Specimen'
  71. Redraw ChangeArg.gc
  72.